//基本类型
let name1:string="sjf"
let age1=18//自动推断
let ok:boolean=true
let nothing:null=null
let any:any="rf"
let unknown:unknown=66
const notDefined: undefined = undefined
console.log(typeof name1)
console.log(typeof age1)
console.log(typeof ok)

function changeNameToUpper1(ad:string):string{
    let a=ad.toUpperCase()
    return a
}
let xx=function(a:number,b:number):number{
    return a+b
}
console.log("xx:"+xx(1,2))



let mm=(a:number,b:number):number=>{
    return a+b
}
console.log("mm:"+mm(5,6))


let yy:(a:number,b:number)=>number=(a:number,b:number):number=>{
    return a+b
}
console.log("yy:"+yy(3,4))

let kk:(a:string)=>number=(n:string)=>{
    return 8
}
// //数组，元组
// const list1:number[]=[1,2,3]
// const list2:Array<string>=['a','b']
// const tuple:[string,number,boolean]=['sad',66,true]
// console.log(list2[1])
// console.log(tuple[1])

// //枚举
// enum Color {Red=1,Green,Pink}
// const c:Color=Color.Pink
// console.log(c)


